﻿CREATE TABLE [dbo].[Artigo] (
    [Id]             INT           IDENTITY (1, 1) NOT NULL,
    [IdRedator]      INT           NOT NULL,
    [IdTema]         INT           NOT NULL,
    [DataInclusao]   SMALLDATETIME NOT NULL,
    [DataPublicacao] SMALLDATETIME NOT NULL,
    [Titulo]         VARCHAR (40)  NOT NULL,
    [Conteudo]       TEXT          NOT NULL,
    [Ativo]          BIT           DEFAULT ('1') NOT NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF),
    FOREIGN KEY ([IdRedator]) REFERENCES [dbo].[Redator] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION,
    FOREIGN KEY ([IdTema]) REFERENCES [dbo].[Tema] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION
);



